use super::address::SocketAddr;

pub struct UdpSocket {
    pub local: SocketAddr,
}
impl UdpSocket {
    /// Returns the socket address that this socket was created from.
    pub fn local_addr(&self) -> Result<SocketAddr, ()> {
        Err(())
    }
    /// Sends data on the socket to the given address. On success, returns the number of bytes written.
    pub fn send_to(&self, buf: &[u8], addr: SocketAddr) -> Result<usize, ()> {
        Err(())
    }
    /// Receives a single datagram message on the socket. On success, returns the number of bytes read and the origin.
    pub fn recv_from(&self, buf: &mut [u8]) -> Result<(usize, SocketAddr), ()> {
        Err(())
    }
}
